Skip to content

fix(history): restore attachments during session replay#297

Open
Orcaryn wants to merge 1 commit into
agentclientprotocol:mainfrom
Orcaryn:chapeta/history-attachments
Open

fix(history): restore attachments during session replay#297
Orcaryn wants to merge 1 commit into
agentclientprotocol:mainfrom
Orcaryn:chapeta/history-attachments

Conversation

@Orcaryn

@Orcaryn Orcaryn commented Jul 14, 2026

Copy link
Copy Markdown

Summary

  • replay embedded and local history images as ACP image blocks
  • remove Codex's synthetic file wrapper from replayed user text
  • preserve file mentions as ACP resource links
  • keep JSONL fallback replay from duplicating the authoritative thread message and attachment

Root cause

Codex stores attachment context as synthetic prompt text plus structured UserInput entries. During session/load, embedded images and available local images were replayed as text links, file mentions were dropped, and the synthetic wrapper was exposed verbatim. When response-item fallback recovery was active, it also replayed the raw user message and image reference alongside the authoritative thread history.

Validation

  • npm test — 314 passed, 28 skipped
  • npm run typecheck
  • npm run build

@Orcaryn
Orcaryn marked this pull request as ready for review July 14, 2026 12:12
@Orcaryn
Orcaryn force-pushed the chapeta/history-attachments branch from 8e41c9c to 22546c5 Compare July 21, 2026 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants